// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "Components/ActorComponent.h"
#include "WeaponOwner.h"
#include "WeaponCustomLogicBase.generated.h"

/*
 this class is amazing , using the custom component to fit the data driven system`s shortage.
 to be mentioned that ,the item system is data driven based ,and the component is also.
 under this condition ,can customize the weapon just in bp!.
*/


UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class ISALONG2_API UWeaponCustomLogicBase : public UActorComponent
{
	GENERATED_BODY()

public:
	// Sets default values for this component's properties
	UWeaponCustomLogicBase();

	// Called when the game starts
	virtual void BeginPlay() override;

	// Called every frame
	virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;

protected:
	bool _override_OnReloadBegin = false;
	bool _override_OnReloadEnd = false;
	bool _override_OnFireEnd = false;
	bool _override_OnFireBegin = false;
	bool _override_OnFireAnimationEnd = false;
	bool _override_OnFireAnimationFired = false;

	bool _useLogicTick = false;

public:
	bool Get_Override_OnReloadBegin();
	bool Get_Override_OnReloadEnd();
	bool Get_Override_OnFireEnd();
	bool Get_Override_OnFireBegin();
	bool Get_Override_OnFireAnimationEnd();
	bool Get_Override_OnFireAnimationFired();
	bool Get_UseLogicTick();
	
public:
	// to override the base class function

	virtual void OnReloadBegin() {}

	virtual void OnReloadEnd(int count) {}

	virtual void OnFireEnd() {}

	virtual void OnFireBegin() {}

	virtual void OnFireAnimationEnd() {}

	virtual void OnFireAnimationFired() {}

	virtual void PickUp_Addition(IWeaponOwner* character) {}

	virtual void PutDown_Addition(IWeaponOwner* character) {}

	virtual void OnReloadBegin_Addition() {}

	virtual void LogicTick(float DeltaTime) {}

	
};
